various fixes
needed for previous commit