fixed bug in median test