if statement was backwards