Fixed bug where timeout could be set to a negative value.