Fix passing of instance_dir