fix improper use of default dict