three fixes, incl. fix for #13