Bug fix: recreating defs after clear()