Fixed some errors after rebase.