Changes for Rado's code to work.