Corrected the constraints not being updated correctly.