Fixed several bugs with vineyard.