fix generating default variables for scripts on an object type