Fix ORM tree and viewer