added correct target handling