More random fixes after rebase.