Fix error in reading favorites from MySQL