fix bug in 2d resize code