fixing callback to parent window