fixed behave when variance is a float
fixed to behave when variance is a float