Changed the first "if" statement.