Redo of commit a636a977