Apply various fixes to several things