small set of code fixes