#589 - Tweak sandbox clearing logic