fixing bug with array_multisort - not all arguments are passed by ref