remove a useless if statement