fix up some old code