Fixed retreat behavior regression

Properly set beginHeading again.