Fixed setting the data_dir to affect all uses of it.