fixed Cannot read property 'document' of null error issue.
Merge pull request #61 from jongha/master

fixed Cannot read property 'document' of null error issue.