Added safety to test script.