Minor code fixes

Minor code fixes