fix unit test failures for script.