fix sorting in paginator