Added a scale change handler