fixed a (maybe) error in the database write function (mod-watchdog.c)