The unread method was incorrectly appending data to the end of the buffer instead of prepending it to the beginning. This caused issues when reading partial data and then unreading it. Closes #2915 Closes #2346