fix a bug in resizeEvent