Pass self instead of the type in setTarget_()

With this fix, i'm able to execute the example, and doesn't run into the issue described in #2 and #6