Fixes to javascript.