Output directory bugfix