fix NullPointerException on treeMap.put()