Test fixes and rebase problems