bugfix: pid instead of stream in execute_query call