Reset page on filter change and fix sorting