bug fix at patchAtHeadingAndDistance