Fixed issue. Functions were reversed. Was reading in the write section and writing in the read section.
Merge pull request #1 from Advtech92/master

Fixed issue. Functions were reversed.