fixed fd nonsense, addressed #3

The test error was caused by some fd nonsense. I also fixed a small workflow bug that we found earlier...