fixed bug in module name guessing code