fix image reader bug