minor bugfixes, preparing for pipe program