Reverting part of edc2bb73064a76243777a5abf5dc11ef8e900e24 now that cleanup works correctly.