fix a bug in varm