fixed bug when notes query is empty