Access target_definition of target object

I was getting and error here and this fixed it. I think the code was intended to access `target.target_definition` and not `target_definition` directly.