[cmd:resize] fix #628 resize calculation problem