bugfixes for process.sh