fixing the bug when searched notes cannot be displayed appropriately