fix for hashString, from Jan-Willem Maessen (see #1137)