Fix test build and merge conflicts