fix table error when there's no data