Fixing dict problems