Restored a couple of changes that were reverted a little while ago.