Fixed a bug where timestamp would be ovewritten to null