[cmd:resize] fix #628 resize calculation problem
Merge branch '2.x' into 2.x_n