numerous fixes (part 2)