Undo some of b55b890f202557a8ceee917cc3ddced932bf2bb7 to fix crash