I do not see anything malformed with this code you posted. I would suggest that you include "ELSE" statements with logging to verify if the ingroup actually executes or not. There may be a logic error or missing quote elsewhere in the program that somehow affects this block.
_________________________
Home page: http://www.kixhelp.com/hb/