fixed threading problems with date formatting