update .sh, correct python bugs