fixed query issues with get_notes