Fixing a bug in ECDSA signatures. Improving tests