Another batch of fixes