Bugfix in target generation code
Bugfix in target generation code