fix a couple bugs in the resize comand