fix image uploading process