fixed #641 reverts resize command to previous state