A few small issues fixed, see commits