small fixes to validation of strings