Several more minor fixes