adding a few code fixes.