Moved a Function call and the if statement.