What remedial measures have been used to counteract AI’s code of ethic?

Artificial intelligence is a subject that is expanding with the unlimited horizon and beyond anyone’s expectation but it also comes with unexpected problems and need to be handled with accurate measures.