fix Illegal string offset 'handler'