fix incorrect wpdb update array, set to $template_data