Using sort! instead fixed the issue. Thank you!
sort!
Would you be able to take a look at the other question I also posted?