See previous message I edited again.. another thing:

Why are your ingroups like this:

IF INGROUP("groupname",1) ?

They should just be

IF INGROUP("groupname")

correct?