More PRs for the good of bugfixity

Commits self describe except the merge one I accidentally made again.

... first two commits fix #591