Fixed that sorting was being applied only when onResume was called