FIX/ENH for the duality gap check by @xianghang.