fix error when module is undefined; close #13
Merge pull request #14 from ruanmer/master

fix error when module is undefined; close #13