fixed bugs in module.cc dealing with the name