minor, but important fixes on the scripts