fix bug(signature generating algorithm is broken)