Fixed JS errors in home page