Fix a return statement to include generic type