fixed signing and verifying