fix a bug when upload a blank image