Fixed the add many licences logic

* fixed the add many licences logic,
* merge migrations,