fix that local.sh couldn't be executed after upgrade