Small bugfixes

Small bugfixes