Updated from avalon branch #59be259450