Test fixes and rebase conflicts