Fix ORM patches