Fix string handling bug

Fixes an error that occured when a message of length divisible by 8 was sent