bug fix in lhd.java