minor fixed and improvements