handleStageResize is automatically called twice