Fix bugs in IP operations and remove disjoint