Fixed panic: runtime error: index out of range