Fixing edge case for gpu calc neighbor version