fixes #2262 - handle strings from PostgreSQL