fixing browser reload issue