fix table reading