Merge upstream from errbit/errbit

There have been a number of small fixes, though I haven't looked at it much.