fix cannot index into a string