Fix architecture problems