lots of small tweaks and adjustments, see #432