Fixing various constraint errors