Fixed some errors that prevented compilation