fix image detection