fixed a bug in resizing (now that resizing is working)