Minorbugfixes

Same as other comment