fixed bad if