old code fixes