Four robustness fixes in one PR