fix for constraint generation