sign and verify bug fix