setTarget now checks the target