another batch of fixes