Small bug fixes and polish.