Fixed a problem with addDoc (reverse function in display.js)