Minor bugfixes

Some small changes...