Fixed a bug where the last few bytes of data were sometimes ignored and
not passed to the cipher