Fixed bug where 0 length string would cause string overflow.