Redirect and error life cycle fixes

Ensures that pending operations are properly terminated on redirect or error.