Try to fix window.location.reload() not working issue