fix fairly egregious size calculation bug