Fixed exception in checkImages