fixing a bug due to iframe load time