Fixed comparison of hashmaps and closing.