Fixed the NPE exception, which was causing flickering of the screen when there were multiple images open.