Fix failing test + undeploy mechanism