Minor fixes

collected during switch to clang, but unrelated. Wanna merge them separately. Have a closer look at a304e27fa735385b5c1432dfdda66d42f734aad7