fix a bug of importing image