Bugfix in fromdict function.