Fix test handling issue introduced in recent a commit