Fix a broken function