fix bug on home page reload