fixed javascript error in initialize functions
Merge pull request #4 from nathanrharris/master

I fixed the javascript bug RJ pointed out via email.