Add timeouts and handle empty returns properly