fixed a bug which caused an "Already reading" exception