fix bug with resize closes #448