Fixed huge bug (how did it ever work before?)
Made IntMap traverse in the correct order