Sorting fixes, refresh button