target generation bug fix