Fixed type argument problem causing infinite recursion