Fixed exception caused when small image datasets are plotted