fixed the issue with getting information from the sorted table