minor bug fixes and clarifications