Removed unneeded var and if statement.