Moved First_id_node from global to local variable