fixed some bugs around notes