Replaced x.__dict__ with vars(x)

seems to still work >:D