Fix misc errors