Fixed bug in timestamp and timeout