finished fixing duplicate target bug