Fixed a bug that would cause incomplete responses to be send when the size of the in put and the size of the output is different,