Fix reversed direction mappings.
Merge branch 'original'