fixed bug in homepageStatsDirective and bug with nodejs