An improved exact Riemann solver for relativistic hydrodynamics