Change casting of mean to double.