fixed big bug random uniform generator. Must be double, instead of float.