fixed code coverage running the javascript twice.