Fix bug in removing the autolaunch iframe