Minor improvements to capture/replay