Bug fix- Fixed heading calculation error. Was always zero.