Fixed query bug in HomeController.