Fixed favorite sorting as it was not functioning before