I don't know why it does that, but you can reset it with

SetCurrentDirectory(_chr(work_dir));


POTATO-MAN saves the day! - Random