Updated ScriptHandler because it was buggy