fill size correctly before using it

caused copy on write to fail