more old code fixes