fixing target_check_path invalid free