Hotfix getadjacentblock mathematics