Multiple minor fixes