Fixed duplication of type parameters.
Fixed warnings.