Brought over changes from 2.2