The fix for the double page reload issue