0.9.8b support

This is a cherry pick of #767 with the final required changes.