Fix error: "Undefined variable document"
Merge pull request #5 from trinhvanduong/master

Fix error: "Undefined variable document"