Added context and crash patch to Network class