Fixes for JavaScript errors and fix for hardcoded parameter value