Hopefully the final fixes for GitHub issue #29.