better error-recovery