resolve type inference error