Several bug fixes.

The bishop library had a bug in it that caused everything to fail to
verify. This fixes that.