Corrects some errors