error resilience cleanup (its faster too...)