fix restart after alert and failure on webkit