Bugfix: fixed crash with refresh
Bugfix: fixed sqlite sorting