Defect fixes from testing