Financial compensation and putting those that caused the injustice in prison equaling the total of all of the terms served by all of those affected. That is as close to justice as could be had.
As for preventing corruption- there's no way to do this as long as there are people that can be corrupted. You can add oversight. You could replace the entire force with minorities. But if there are people that are corruptible, these efforts will fail. The best that you can do is to (1) promote ethics education in schools and flag students that reject it/scoff at it as they may need much more help and (2) don't divorce government and schools from religion which is an additional force for peer-pressure and community support against corruption.