Fixed the API to be fully backward compatible