fix restartbug, added date of last query