Fixed performance issues in scripts, not using SORA_COMPAT