fixed the compute image mean bug