Fix illegal string offset warnings