fix image handler