Make HM tests more stable