Update scripts  bug fixes