fixed javascript file errors for deployment