fix unwanted if statement