fix "index out of range" panic
fix "index out of range" panic (better)
even better