Fixed improper use of the "for" for ranges

Sprite support is therefore fixed