Fixed if statement error