Fixed the loading favorites function