Bug Fixes

Fixed problem with means and medians.