fix a lot of inspection issues