Clean up in error case.