Made more robust to errors to allow watching