Fixed bug with timing out