fixes for several dictionary lookups

More instances where dictionary look up port did not translate well to C#. Needs TryGetValue approach.