Fixed serious bug about threading
Fixed notification delay