fix missing prototype
fix missing js function rewrite
Merge pull request #1 from jfroche/master

Fix javascript calls