Fixed a small performance issue with double terminated strings