Make sure unit tests don't null ref.
Updated javascript file