Fixing click state when removing flag