Error Recover

Redid the function