Fix targetId bug