Fixed a little bug when updloading images