Cleanup the string stream before reusing it

This was causing old parameters to be reused in new not fully parsed protocol commands.