Fix some new warnings introduced after r5022