add guard to target_port