fixes for haver function