fix bug

exceptions.IndexError: list index out of range

Signed-off-by: Max Liao <maxliaops@gmail.com>