minor bug fixes on new scripts