Hi Michael,
Scaling by 1/||h|| and 1/||q|| results in relative residual norms. However, if h or q is the zero vector, then the relative residual norm is undefined. Scaling by 1/max(1,||h||) and 1/max(1,||q||) means that the stopping criteria are either the relative residual norm or the absolute residual norm, depending on ||h|| and ||q||.
Martin