fixes to worker_init and checkpointing