fixed an error caused by calling a dict