unmerged changes from 2.4 branch