fixed 5.2 event bug and thread creation