Bug fixes and schema changes