Change to wait for gets thread to complete