fix popen3