removed useless else check
fixed if statement already checked by where clause
leave group will remove user from tasks belong to group