Fixed peek, read, and available functionality