Fix typo in readAll function