Added check to make sure cargo has enough space