fix type error for thread callback