Fix a generic function