few more robustness tweaks
merge with's george's lock