Writing unicode params to buffer fix