fix image uploader with $apply()