Fix problems with constarains
Fix constrains.