Copy only as much information as possible to avoid stack corruption.