fix writeSprite onDraw