Fixed bug in the equality function for note