fixed a silly bug with constraint generation