Fixed deferred callback handling on page unload.