Fixing miscellaneous bug found in QA