should fix "cant call method "setdefault" on an undefined value" errors, RT#10360