Fixed possible errors due to initial capacities