detailsController and its DB call fixed