Test fixes

Not ready for merge yet