Fixed undefined variable reference bug in source.py.