Fixed some seg faults, commented out IP conversion to host in the megafunction