Frontend: Fix sorting to work on each view independently