Fixes possible issues with wrong initial capacities