Fixes a Python 3 dictionary error