fixes a fatal error that if main module is defined, an error will throw