Bug fixes to random methods in continuous.py