Test fixes and merge conflicts