some more fixes + support for ORM