fix image upload bug