Fixes for pipestash

Some quick fixes I did for pipestash to run.