vm bc fix and tests