fixing a crash when receiving a note