Fixed some ORM bugs regarding data types and default values.