fix broken sortAlts implementation