fixed issues with resize