fixed warning on zero length string