Fix a bug in intersection