Fixed wrong if statement.