Fix incorrect sizes being written for entries > 32kb