Stats median method bug fixed