fixed dict del bug introduced while fixing prev bug