Fix wrong call to spectools function
Fix call to os.getenv function.