Fixed authority ordering bug.
Fixed table creation SQL syntax bugs.