Replaced keySet iterator with entrySet iterator.

Performance - Inefficient use of keySet iterator instead of entrySet iterator