Updated for loading from iframe.