Updated from avalon branch #8b4d975