Clear more references on undeploy