fixed minor bugs in schema and permissions