Fixed if statement and removed code