puts() implementation fix