Fix dynamic interface insertion and add debug messages.