more code fixes