Fixed a bug in vector when initializing with 0 elements

Change-Id: I6d673faf9d36a90a4084f3ccf42900a65580e700