fix trap_stdio() call