various minor fixes