Fixing mean to behave correctly for floats.