NPE fix, working on map support