fixes to chat for the orm refactor, and orm fixes