Fixed some errors after merging