updated callback for firefox