Fix uninitialised variables.
Use checked_fread during thread loading, too.