Fixed some errors