Fixed viewer bugs & export bugs