fix calc write size