Fix issue #341 list indices must be intergers not str