Temporarily fixed a bug in the viewer UI loading logic that will be refactored later.