Fixing bug on boundary cell neighbor