Port branch to work with current master.