Final batch of fixes