Improve legacy API compatibility