Couple of bugfixes

Resolves #119