Fixed a bug in imtovis