Fixed bug in iframe: self.iframe should be set before event handler