(0.9.37) Backport over changes from 0.9.37-unstable