sign and verify bug fix v2