Illegal string offset 'stype'