fix implementation that broke tests