Fixed a problem with Popen