Small bugfixes. Fixes #110.