corrected errors introduced when scripts were separated in prev commit