repair changeSize() function