fix image path generation