Fixed some errors after merge