Fixed the trimmed mean calculation under various special cases.