fix for script errors