fix up preallocation handling