Fix run script and corrected issue with shift