Fix a bug in signature verification