fixing an problem with the error checking for module names