Fix sprite index out of range.
Fix #5