fixed some errors, but not all