Fix a few function definitions