Fix error in contiguous faces calculation