minor robustness fixes