If statement fix