Fix a bug in clipping.