Fix a bug in listing favorites