Small bugfixes for #35.