Minor termination handling tweaks