Fixing some constraint stuff