Fixed a error in the viewer