backported to 2.2