fix critical errs