sorting notes bug