Fix legacy implementation