Fix a bug causing crash due to ns notifications