Fixed bug that created a time vector of the wrong length.