Fix legacy API