Fix type inference issues.