Fixed hasOrder initialization