Fix error checking on sign field for hgm search