fix small bug in self-signature checking