Unfortunately 0.5.19a is broken, mod won't work with it. Will have to wait for a fixed 0.5.19b. The regex change mentioned in the changelog broke single-line variables added in a mod, which this mod depends upon. The "var randomportraits = null" line from my mod no longer gets inserted.
Viewing post in Improved Random Portraits v1.0
https://itch.io/t/292969/bug-0519a-regex-for-variables-broken
You can use the modpanel.gd i linked to on pastebin from there if you want to use 0.5.19a, would need to replace it in both files and backup folders, otherwise changes will be lost after applying, making next apply also break. Hopefully fix is put into a 0.5.19b soon.