fixed Undefined index: modname
Merge pull request #1157 from rojblake/editregistryfix

fixed Undefined index: modname