timeout: Fix logic error