Bugfixes

Small bugfixes