Changes to vbf optimization code that were left out