fixed some bug in uploading images for google chrome