stability fix, backported