bug fixes and clarification