bug correction on constraint