Check if closereg is set.
JSON dict decorator fix.