Illegal string offset fixed