Fix cleanup on the shim as well