Fix sortBy second parameter when given as arguments as array