Made corrections to dispatch.py