Fix for javascript error

Fixes #6
Merge pull request #7 from Sitefinity/review

Fix for javascript error