fixed dom unload to be per mozilla spec fixing issues