fix sort error - na.last = TRUE, not NA