Better timeout checking