Cosmetics and regression test fixes