Fix get search term in controller