Test fixes

Not ready for merge yet
so it's not an upstream problem?