fix several minor errors