better redeploy handling