fixed printing twice