Minor bug fixes, and preparation for release