some minor bugfixes

some minor bugfixes