minor modification to resizing problem