Minor tweaks

cleaned up bugs in resizing code.