Fixed bug in RG simulator.