more fixes from code review