first pass at a 0.8 fix. Basically works