fixed bad file descriptor with pipes

Trying to find out why a ERROR 155 is being called