fix reserve to follow std vector implementation.