fix bugs in FourierMotzkin and Cooper