corrects some errors