fixed some devastating errors