bug fix in patchAtHeadingAndDistance