Fix scripting after refactor