Merging functionality from 0.5.1 back in ...

... the code from tag 0.5.1 was never merged into master, resulting in 0.5.2 not including it. This fixes that in a new release.
This tag has no release notes.