fixing on reload issue