fix #3: if we did not change output copy input as is and put 0 at end