mostly minor fixes