Fixed return value problem with proc_open/close