Merged in Christian's target directory patch