high quality code fixes