Bug in KKT constraints fixed