Fix tests after rebase onto master