Fixing a bug with the variable name
Order notes by date