fix timer issue on Safari