Sync from 5.4 branch