Fixing page-reload bug: part1