fix statistics for external table