Fixed a bug for the thread read