minor bug fixes, documentation