fixed bug in scaling along with boxed bound control + unit test