Fix type constraint
Fix error message