Fixing more issues with scripts