fix a bug or two in previous pull request + bump version