Fixed viewing bug

null pointer has been fixed i hope