Fixed AttributeError due to types.ListType, changed by list to support Py3.