Fix timeout logic (AND instead of OR condition)