unset undefined properties properly in let