JavaScript functions no longer crash due to incorrect number of params.