minor fixes for python scripts