fix mean bug