Fixing timeout logic

To collect measured variables