Fixed overwriting issue when same state maps to same state