Fix buggy constraints