Connect and disconnect events are now defered if called off-thread.
Fixed the payload copy function.