fix typing issues with Constraints