Changed the constructor to support smaller vectors