added missing semicolons
fixed minor bugs in user permissions