some defect fixes