various fixes, robustness checks, one-type