fix validation of checking hg