fixed a bug in maskClass.storeAll