bug fixes and docs updates