Fix for incorrect resizing of v