Fix crash in timestamp code.
Merge pull request #61 from ahmedcharles/timestamp_crash

Fix crash in timestamp code.