Fix: avoid i18n messages to be stored in place of permission ids. test fixes. id generation duplication fix.