corrected a bug in ehvi