Fixed initialization problem in PhotoViewer.