fixed the bug in favorites