fixing viewer to work with small viewers