Random error generator: fixing a bug.