A bit more robust string handling