Trying to make more robust to errors