fixing a bug in home.js