theoritically fix the prealloc-more-than-desired bug