Fixed bug with illegal string offset