else-rew saving buf fix

Rewrite input in else clause were saved wrongly as an raw array without
'join'ing them.