fix h overflow problem