fixed a bug due to FreeBSD version naming of sort