fix for potential double callback in browser.