fix mean and median