Fix bug where query parameters weren't being passed to $prepared_args.