fixing extract_checkpoint()