fixed dict.val bug