fixed bug in SpriteGrid