updated treemap hashing to avoid spaces and react to backbutton