Fixed invalid variable references in Sprite system