fixes for the latest ORM