fix empty target bug