fix some defects from review