fix a typo for ValueError call