fix error in viewers controller for subdomains