Fixes the script errors