Fixed null dictionary issue