fix(JS): fixed bug in iframe removing function