fixed a bug where replaced entries had wrong date; command-line debug switch