Fix compilation error where generic could not be resolved