Fixed global js error
Merge pull request #414 from jdalphon/fixGlobalJSError

Fixed global js error