Added a function for fixing anything that is broken.