fixed a if statement