fix constraint handling rules