fix timestamp implementation