trying to fix bug #88 (error during resizing)