fix image-min flatten