Fixing issue with sorting

Was an issue that when trying to sort the entry_id column, it return
nothing. This is now fixed.