Fixed bug involving null targetDirs for generation