JS: fixing conflict issues