Fixing cases where work_dir is None or False