Fixed erroneous if statement.