Issue #2107097 by subhojit777: Fixed Error after 6 to 7 port of this module (updates for d6 to d7 upgrade -- subhojit777 FTW).