adding check for scalingOrders != null whne DEBUG is turned on