minor changes for better compatibility with SGE cluster