fixed null pointer on curImgSize