Fix a use of old function