Fix bug with non-integer timeouts