Sorting out heading alignment