Two small fixes in constraint generation