Small improvment to the algorithm used to display the notes