fixed getTimestamp