several minor improvements