Use rec_num for UserPermissions. Fixes #21