fixed mean plotting bug