fixed double-store upload bug & document validation