fixed undeploy procedure