correctly handle 0^0

I don't know if this is the preferred method of submitting bug fixes, but I just noticed this.