set negative timestamps to zero