Fixed sorting of NotesArray

Now automatic note placement should be quite exact and reliable