Add protection into the vis manager to stop it crashing on corrupted state which is making debugging slower. This may need to be removed again