fix nan error on home page