Fixed if statement block