fix: 'msg' is freed after the thread is created
pass the arguments directly