fixed enforcement of undeploy