Fixed get_first_outgoing_url hack function