Fixed minor bug in imstats