fixed bug in readAll