'with_capacity' fix