fixing javascript error

This fixes the javascript error reported in issue #25 

Thanks @maininfection