Fix exception when favorites is empty - Thanks bdam