Better constraint handling